package com.mallkit.core.helpers
{
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	import mx.utils.StringUtil;
	
	/**
	 * All sattaic class. to help handling links in text
	 */
	public class LinkHandler
	{
		/**
		 * Handles a link
		 */
		public static function handleLink(link:String):void
		{
			if (!link || StringUtil.trim(link) == "")
			{
				return;
			}
			
			if (link.indexOf("http://") == 0)
			{
				navigateToURL(new URLRequest(link), "_blank");
			}
			else
			{
				switch (link)
				{
					default:
						//do nothing
				}
			}
			
		}
	}
}